﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

#nullable disable

namespace Faser_VoteSys.Models.Database
{
    [Index(nameof(ParticipationId), Name = "idx_CompanyAwards_ParticipationID")]
    public partial class CompanyAward
    {
        [Key]
        [Column("AwardID")]
        public int AwardId { get; set; }
        [Column("ParticipationID")]
        public int ParticipationId { get; set; }
        [Column("ResourceGroupID")]
        public int ResourceGroupId { get; set; }
        [Column(TypeName = "datetime")]
        public DateTime AwardTime { get; set; }
        [Required]
        [StringLength(50)]
        public string AwardType { get; set; }

        [ForeignKey(nameof(ParticipationId))]
        [InverseProperty("CompanyAwards")]
        public virtual Participation Participation { get; set; }
        [ForeignKey(nameof(ResourceGroupId))]
        [InverseProperty("CompanyAwards")]
        public virtual ResourceGroup ResourceGroup { get; set; }
    }
}
